package com.bzframework.ai.langchain4j.tool;

import dev.langchain4j.agent.tool.P;
import dev.langchain4j.agent.tool.Tool;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author bingzhong
 * @Date 2025/8/1
 * Tool Calling 工具调用
 */
@Slf4j
public class SimpleFunctionTool {

    @Tool(name = "addTwo", value = "计算两个数之间的和")
    public Double add(@P(value = "the param of a") Double a, @P(value = "the param of b") Double b) {

        log.info("ai调用了工具addTwo,参数为a:{},b:{}", a, b);
        return a + b;

    }


}
